<?php namespace Common\Model;
use Hdphp\Model\Model;
class Address extends Model
{
	protected $table = "address";
	protected $validate = array(
	  array('name','required','请输入名字',3,3),
	  array('phone','phone','请输入正确的电话',3,3),
	  array('ad','required','请输入地址',3,3),
	  array('code','required','请输入邮编',3,3),
	);
	public function store()
	{
		if(!$this->create()) return false;
		return $this->add();
	}
	/**
	 * 修改地址
	 */
	public function edit()
	{
		if(!$this->create()) return false;
		return $this->save();
	}
}
